import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class IODemo4 {
    // 使用字符流写入文件内容
    public static void main(String[] args) {
        try ( Writer writer =new FileWriter("./test.txt",true);){
            String s ="你好呀";
            writer.write(s);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
